
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int fei1(int wei)
{
	if (wei > 2)
		return fei1(wei - 1) + fei1(wei - 2);
	else if (wei == 1 || wei == 2)
		return 1;
	else
		return 0;
}

int fei2(int wei)
{
	int i = 1, j = 1, k = 0;
	for (k = 0; k < wei-2; k++)
	{
		if (k % 2)
			i = i + j;
		else
			j = i + j;
	}
	if (k % 2)
		return j;
	else
		return i;
}

int mainfbnq()
{
	int wei;
	scanf("%d", &wei);
	printf("%d\n",fei1(wei));
	printf("%d",fei2(wei));

	return 0;
}